<?php
require_once('IControleNoticia.php');
require_once($_SERVER["DOCUMENT_ROOT"] . '/Esquina_da_TI/DAO/RepositorioNoticia.php');
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ControleNoticia
 *
 * @author Paulo
 */
class ControleNoticia implements IControleNoticia{
    private $repositorioNoticia = null;

    public function __construct() {
        $this->repositorioNoticia = new RepositorioNoticia();
    }
    

    public function cadastrarNoticia($noticia){
        return $this->repositorioNoticia->cadastrarNoticia($noticia);
    }

    public function localizarNoticia($codNoticia,$titulo){
        return $this->repositorioNoticia->localizarNoticia($codNoticia, $titulo);
    }

    public function atualizarNoticia($noticia){
        return $this->repositorioNoticia->atualizarNoticia($noticia);
    }

    public function removerNoticia($codNoticia){
        return $this->repositorioNoticia->removerNoticia($codNoticia);
    }

    public function noticiasRecentes(){
        return $this->repositorioNoticia->noticiasRecentes();
    }

    public function mostrarNoticias(){
        return $this->repositorioNoticia->mostrarNoticias();
    }

    public function carregarNoticia($id){
        return $this->repositorioNoticia->carregarNoticia($id);
    }
}
?>
